import request from '@/utils/request'

// 查询商家团购活动列表
export function listShangjiatuangou(query) {
  return request({
    url: '/system/shangjiatuangou/list',
    method: 'get',
    params: query
  })
}

// 查询商家团购活动详细
export function getShangjiatuangou(sjtgId) {
  return request({
    url: '/system/shangjiatuangou/' + sjtgId,
    method: 'get'
  })
}

// 新增商家团购活动
export function addShangjiatuangou(data) {
  return request({
    url: '/system/shangjiatuangou',
    method: 'post',
    data: data
  })
}

// 修改商家团购活动
export function updateShangjiatuangou(data) {
  return request({
    url: '/system/shangjiatuangou',
    method: 'put',
    data: data
  })
}

// 删除商家团购活动
export function delShangjiatuangou(sjtgId) {
  return request({
    url: '/system/shangjiatuangou/' + sjtgId,
    method: 'delete'
  })
}
